package com.eg.egent.example;

import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.eg.egent.example.common.Constants;
import com.eg.egent.example.common.ApiUtil;

/**
 * @Description: 删除设备配置示例程序
 * @author liangjiange
 * @date 2016年10月12日 上午11=0:37:14
 */
public class DeviceConfigDeleteExample {

	private static Integer encrypt = Constants.ENCRYPT_NO;

	private static Integer signMethod = Constants.SIGN_METHOD_HMAC;
	
	private static String taskDesc = "删除设备配置";

	public static void main(String[] args) {

		JSONObject mainContent = new JSONObject();
		mainContent.put("method", "device.config.delete");
		
		/**
		mainContent.put("main_control_mac", "08:16:00:00:09:18");
		JSONArray childDeviceArray = new JSONArray();
		JSONObject childDevice = new JSONObject();
		childDevice.put("child_device_code", "151306");
		childDevice.put("comm_code", 100);
		childDeviceArray.add(childDevice);
		mainContent.put("device_list", childDeviceArray);
		**/
		

		mainContent.put("main_control_mac", "00:15:09:09:46:32");
		JSONArray childDeviceArray = new JSONArray();
		JSONObject childDevice = new JSONObject();
		childDevice.put("child_device_code", "00139243");
		childDevice.put("comm_code", 1600);
		childDeviceArray.add(childDevice);
		JSONObject childDevice1 = new JSONObject();
		childDevice1.put("child_device_code", "34707");
		childDevice1.put("comm_code", 16000100);
		childDeviceArray.add(childDevice1);
		mainContent.put("device_list", childDeviceArray);

		
		ApiUtil.excute(encrypt, signMethod, taskDesc, mainContent);

	}

}
